import React, { Component } from 'react';
import { NavBar , Icon} from 'antd-mobile';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import './index.less';


export default class HeaderBar extends Component{
    static contextTypes = {
      router: PropTypes.object.isRequired
    }
    constructor(props) {
      super(props);
      this.state = {

      }
    }

    componentWillMount() {

    }
    goLogin=()=>{
      this.context.router.push({
        pathname: '/Login'
      })
    }

    render(){
        return(
            <div className='navbar'>
              <img src="./imgs/noImg.png" alt="" />
              <span className='appName'>XX公寓 <a >南京</a></span>
              <span className='title'></span>
              <img src="./imgs/news.png" className='login' alt="" onClick={this.goLogin.bind(this)}/>


            </div>
        )
    }
}